package com.ts.admin.modules.content;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ts.common.core.utils.Result;
import com.ts.feign.api.TopicService;
import com.ts.feign.dto.CategoryDTO;
import com.ts.feign.dto.TopicDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/topic")
public class TopicController {

    @Autowired
    private TopicService topicService;

    @PostMapping("/page")
    public Result<Page> page(@RequestParam("page") Integer page){
        Page<TopicDTO> mpPage = new Page<>();
        mpPage.setCurrent(page);
        return new Result<Page>().ok(topicService.page(mpPage));
    }
}
